package configuration

import (
	"encoding/json"
	"kop/modules/configuration/client"
	"kop/util/log"
)

var payConfigs []ActivityValueConf

func init() {

	if err := json.Unmarshal(client.Load("ActivityPay"), &payConfigs); err != nil {
		panic(err)
	}

	log.Info("Load ActivityPay.json success.")
}

func GetPayConfig(serverID int32) ActivityConf {

	if conf, ok := payList1.GetOne1(serverID); ok {
		return conf
	} else {
		return payList2.GetOne2(serverID)
	}
}
